home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / 3Dmodeling / sgiobj.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-02  |  1.6 KB  |  69 lines

  1. /*
  2.  * Copyright 1992, 1993, 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17.  
  18. /* Tom Davis -- 1992 */
  19.  
  20. #ifndef SGIOBJDEF
  21. #define SGIOBJDEF
  22.  
  23. #define SOMAGIC        0x5424
  24.  
  25. /* types of objects */
  26. #define OBJ_QUADLIST    1
  27. #define OBJ_TRILIST    2
  28. #define OBJ_TRIMESH    3
  29. #define OBJ_END        4
  30.  
  31. /* offsets to data */
  32. #define OFFSET_NORMAL    0
  33. #define OFFSET_UVS    3
  34. #define OFFSET_COLOR    3
  35. #define OFFSET_POINT    6
  36. #define PNTLONGS    9
  37.  
  38. /* how to draw an object */
  39. #define DRAW_POINTS    0
  40. #define DRAW_NORMALS    1
  41. #define DRAW_UVS    2
  42. #define DRAW_COLORS    4
  43. #define DRAW_LINES    8
  44.  
  45. /* tmesh opcodes */
  46.  
  47. #define OP_BGNTMESH    1
  48. #define OP_SWAPTMESH    2
  49. #define OP_ENDBGNTMESH    3
  50. #define OP_ENDTMESH    4
  51.  
  52. typedef struct sgiobj {
  53.     struct sgiobj *next;
  54.     long objtype;
  55.     long nlongs;
  56.     long *data;
  57.     long xnlongs;
  58.     long *xdata;
  59. } sgiobj;
  60.  
  61. sgiobj *readsgiobj();
  62. sgiobj *clonesgiobj();
  63. sgiobj *newtriobj();
  64. sgiobj *newquadobj();
  65. sgiobj *catsgiobj();
  66. sgiobj *tmeshobj();
  67.  
  68. #endif
  69.